import request from '@/utils/request'
export function listCategoryBrand(query){
    return request({
        url: '/product/categoryBrand/getBrandList',
        method: 'get',
        params: query
    })
}

export function deleteCategoryBrand(id){
    return request({
        url: '/product/categoryBrand/' + id,
        method: 'delete'
    })
}
export function listCategory(id){
    return request({
        url: '/product/category/treeSelect/' + id,
        method: 'get'
    })
}

export function addCategoryBrand(data){
    return  request({
        url: '/product/categoryBrand',
        method: 'post',
        data: data
    })
}

export function updateCategoryBrand(data){
    return  request({
        url: '/product/categoryBrand',
        method: 'put',
        data: data
    })
}

export function getCategoryBrand(id){
    return request({
        url: '/product/categoryBrand/' + id,
        method: 'get'

    })

}

export function listCategoryBrandByCategoryId(id){
    return request({
        url: '/product/categoryBrand/brandList/' + id,
        method: 'get'
    })
}